package ute.mvc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ute.mvc.dao.TestPartDAO;
import ute.mvc.model.TestAndQuizz;
import ute.mvc.model.TestPart;

@Service("testPartService")
public class TestPartServiceImpl implements TestPartService{

	@Autowired
	TestPartDAO testPartDAO;
	@Transactional
	public void addTestPart(TestPart testPart) {
		testPartDAO.addTestPart(testPart);
	}
	@Transactional
	public void updateTestPart(TestPart testPart) {
		testPartDAO.updateTestPart(testPart);
	}
	@Transactional
	public void deleteTestPart(TestPart testPart) {
		testPartDAO.deleteTestPart(testPart);
	}
	public String getMaxIdInTest(TestAndQuizz test) {
		// TODO Auto-generated method stub
		return testPartDAO.getMaxIdInTest(test);
	}
	public TestPart getTestPartById(String id) {
		// TODO Auto-generated method stub
		return testPartDAO.getTestPartById(id);
	}
	public List<TestPart> getTestPartByTest(TestAndQuizz test) {
		// TODO Auto-generated method stub
		return testPartDAO.getTestPartByTest(test);
	}
}
